<?php
defined('_JEXEC') or die('Restricted access'); 
 
jimport( 'joomla.html.html.tabs' );
JHtml::_('jquery.framework');
JHtml::_('behavior.keepalive');
JHTML::_('behavior.tooltip'); 
JHtml::_('behavior.framework');
?>

<script type="text/javascript">
	//<![CDATA[
	Joomla.submitbutton = function(pressbutton){
		if (pressbutton == 'cancel') {
			submitform( pressbutton );
			return;
		}
		if (pressbutton == 'save') {
			if (document.adminForm.name.value == "") {
				alert( 'Must have club name !' );
				document.adminForm.name.focus();
				return false;
			}
			if (document.adminForm.code.value == "") {
				alert( 'Must have code !' );
				document.adminForm.code.focus();
				return false;
			}
			
			submitform( pressbutton );
		}
	}
	
</script>

<form action="<?php echo JRoute::_("index.php?option=com_wrd")?>" method="post" name="adminForm" id="adminForm" >
	<div class="row-fluid">
	    <fieldset class="adminform">
	    	<legend><?php echo JText::_('Details')?></legend>
			<table class="table table-striped adminlist">
				<tr>
					<td class="key">
						<label for="title"><?php echo JText::_('Club Name')?>:</label>
					</td>
					<td colspan="2">
						<input type="text" title="type" maxlength="50" size="50" value="<?php echo $this->data->name; ?>" id="name" name="name" class="name"/> *
					</td>
				</tr>
				<tr>
					<td class="key">
						<label for="title"><?php echo JText::_('Code')?>:</label>
					</td>
					<td colspan="2">
						<input type="text" title="type" maxlength="50" size="50" value="<?php echo $this->data->code; ?>" id="code" name="code" class="code"/> *
					</td>
				</tr>
				<tr>
					<td class="key">
						<label for="title"><?php echo JText::_('Description')?>:</label>
					</td>
					<td colspan="2">
						<?php echo $this->lists['des']; ?>
					</td>
				</tr>
				<tr>
					<td class="key">
						<label for="title"><?php echo JText::_('Projects')?>:</label>
					</td>
					<td colspan="2">
						<?php echo $this->lists['projects']; ?>
					</td>
				</tr>
				<tr>
					<td class="key">
						<label for="title"><?php echo JText::_('Publish')?>:</label>
					</td>
					<td colspan="2">
						<?php echo $this->lists['published']; ?>
					</td>
				</tr>
            </table>
		</fieldset>
	</div>
	
	<input type="hidden" name="created_id" value="<?php echo $this->user->id;?>" />
	<input type="hidden" name="controller" value="clubs" />
	<input type="hidden" name="option" value="com_wrd" />
	<input type="hidden" name="id" value="<?php echo (int)$this->data->id; ?>" />
	<input type="hidden" name="task" value="" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
